<template>
    <div class="temp">
        <h3 v-text="desc.title"></h3>
        <div v-html="desc.content"></div>
    </div>
</template>

<script>
    import common from "../../kits/common"
    import {Toast} from 'mint-ui'
    export default {
        data() {
            return {
                goodsid:0,
                desc:{}
            }
        },
        created() {
            this.goodsid = this.$route.params.goodsid;
            this.getDesc();
        },
        methods:{
            getDesc() {
                const url = common.apidomain + "/api/goods/getdesc/" + this.goodsid;
                this.$http.get(url).then((response) => {
                    let body = response.body;
                    if (body.status != 0) {
                        Toast(body.message);
                        return;
                    }
                    this.desc = body.message[0];
                })
            }
        }
    }
</script>

<style scoped>
    .temp {
        padding: 5px;
    }
    h3 {
        line-height: 1.5em;
        border-bottom: 1px solid rgba(0,0,0,.3);
    }
</style>